package com.net.oil.coupon.presenter;

import com.net.oil.base.BasePresenter;
import com.net.oil.coupon.bean.CouponList;
import com.net.oil.coupon.contract.CouponListContract;
import com.net.oil.coupon.model.CouponLIstModel;

/**
 * 作者：lch
 * 时间：2018/4/29 0029:下午 16:34
 * 邮箱：245850413@qq.com
 * 说明：
 */

public class CouponListPresenter extends BasePresenter<CouponListContract.View> implements CouponListContract.Presenter {

    private CouponListContract.View view;
    private CouponListContract.Model model;

    public CouponListPresenter(CouponListContract.View view) {
        this.view = view;
        model = new CouponLIstModel(this);
    }

    @Override
    protected void unSubscribe() {
        model.unSubscribe();
    }

    @Override
    public void getCouponList(int used, int page, int rows) {
        model.getCouponList(used, page, rows);
    }

    @Override
    public void getCouponListSuccess(CouponList couponBeans) {
        view.getCouponListSuccess(couponBeans);
    }

    @Override
    public void getCouponListFailed() {
        view.getCouponListFailed();
    }
}
